#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

void merge(int* num1, int nums1Size, int m, int* num2, int nums2Size, int n) {
	int i = m - 1, j = n - 1, dist = m + n - 1;
	while (i >= 0 && j >= 0)
	{
		if (num1[i] > num2[j])
		{
			num1[dist] = num1[i];
			dist--;
			i--;
		}
		else
		{
			num1[dist] = num2[j];
			dist--;
			j--;
		}
	}

	while (j >= 0)
	{
		num1[dist] = num2[j];
		dist--;
		j--;
	}

}